﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="Popular.aspx.vb" Inherits="TechJunkieProj.Popular" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
<style type="text/css">
        .latestDisc4
        {
            width: 248px;
        }
        </style>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <p>
        <br />
    <link href='http://fonts.googleapis.com/css?family=Kaushan+Script|UnifrakturMaguntia' rel='stylesheet' type='text/css'>&nbsp;
    
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<h1 class= "PageTitle">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<u>Most Popular<br />
        </u></h1></p>
    <p>
    </p>
    <br />
    <br />
    <br />
    <br />
    <br />
    <div style="background-color: #C0C0C0; font-size: x-large; height: 61px; text-align: center; width: 422px; position:relative; top: 0px; left: 5px;"><strong>Most Viewed Article</strong></div>
    
<div style="background-color: #C0C0C0; font-size: x-large; height: 61px; text-align: center; width: 434px; position:relative; top: -62px; left: 481px;"><strong>Most Viewed Question</strong></div>
<br />
<br />
<br />
<div class="latestDisc4"  style="position:relative; top: -108px; left: -1px; height: 145px; width: 425px;"><br /><br />
    <asp:ListView ID="ListView1" runat="server" DataSourceID="SqlDataSource1">
        <AlternatingItemTemplate>
            <span style="background-color: #FFFFFF;color: #284775;">
            <asp:HyperLink ID = "HyperLink1" NavigateUrl='<%# Eval("List_FKID", "Details.aspx?ID={0}") %>' runat="server" >
            <asp:Label ID="TitleLabel" runat="server" Text='<%# Eval("Title") %>' />
            </asp:HyperLink><br />Author: <asp:Label ID="AuthorLabel" runat="server" Text='<%# Eval("Author") %>' />
            <br />
            DateUpdated: <asp:Label ID="DateUpdatedLabel" runat="server" 
                Text='<%# Eval("DateUpdated") %>' />
            <br />
            <br />
            </span>
        </AlternatingItemTemplate>
        <EditItemTemplate>
            <span style="background-color: #999999;">Title: <asp:TextBox ID="TitleTextBox" runat="server" Text='<%# Bind("Title") %>' />
            <br />
            Author: <asp:TextBox ID="AuthorTextBox" runat="server" Text='<%# Bind("Author") %>' />
            <br />
            DateUpdated: <asp:TextBox ID="DateUpdatedTextBox" runat="server" 
                Text='<%# Bind("DateUpdated") %>' />
            <br />
            List_FKID: <asp:TextBox ID="List_FKIDTextBox" runat="server" 
                Text='<%# Bind("List_FKID") %>' />
            <br />
            <asp:Button ID="UpdateButton" runat="server" CommandName="Update" 
                Text="Update" />
            <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" 
                Text="Cancel" />
            <br /><br /></span>
        </EditItemTemplate>
        <EmptyDataTemplate>
            <span>No data was returned.</span></EmptyDataTemplate><InsertItemTemplate>
            <span style="">Title: <asp:TextBox ID="TitleTextBox" runat="server" Text='<%# Bind("Title") %>' />
            <br />Author: <asp:TextBox ID="AuthorTextBox" runat="server" Text='<%# Bind("Author") %>' />
            <br />DateUpdated: <asp:TextBox ID="DateUpdatedTextBox" runat="server" 
                Text='<%# Bind("DateUpdated") %>' />
            <br />
            List_FKID: <asp:TextBox ID="List_FKIDTextBox" runat="server" 
                Text='<%# Bind("List_FKID") %>' />
            <br />
            <asp:Button ID="InsertButton" runat="server" CommandName="Insert" 
                Text="Insert" />
            <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" 
                Text="Clear" />
            <br /><br /></span>
        </InsertItemTemplate>
        <ItemTemplate>
            <span style="background-color: #E0FFFF;color: #333333;">
             <asp:HyperLink ID = "HyperLink1" NavigateUrl='<%# Eval("List_FKID", "Details.aspx?ID={0}") %>' runat="server" >
             <asp:Label ID="TitleLabel" runat="server" Text='<%# Eval("Title") %>' />
             </asp:HyperLink><br />Author: <asp:Label ID="AuthorLabel" runat="server" Text='<%# Eval("Author") %>' />
            <br />
            DateUpdated: <asp:Label ID="DateUpdatedLabel" runat="server" 
                Text='<%# Eval("DateUpdated") %>' />
            <br />
            <br />
            </span>
        </ItemTemplate>
        <LayoutTemplate>
            <div ID="itemPlaceholderContainer" runat="server" 
                style="font-family: Verdana, Arial, Helvetica, sans-serif;">
                <span runat="server" id="itemPlaceholder" />
            </div>
            <div style="text-align: center;background-color: #5D7B9D;font-family: Verdana, Arial, Helvetica, sans-serif;color: #FFFFFF;">
            </div>
        </LayoutTemplate>
        <SelectedItemTemplate>
            <span style="background-color: #E2DED6;font-weight: bold;color: #333333;">Title: <asp:Label ID="TitleLabel" runat="server" Text='<%# Eval("Title") %>' />
            <br />
            Author: <asp:Label ID="AuthorLabel" runat="server" Text='<%# Eval("Author") %>' />
            <br />
            DateUpdated: <asp:Label ID="DateUpdatedLabel" runat="server" 
                Text='<%# Eval("DateUpdated") %>' />
            <br />
            List_FKID: <asp:Label ID="List_FKIDLabel" runat="server" Text='<%# Eval("List_FKID") %>' />
<br />
            <br />
            </span>
        </SelectedItemTemplate>
    </asp:ListView>
            <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:ConnectionStringList %>" 
        ProviderName="<%$ ConnectionStrings:ConnectionStringList.ProviderName %>" 
        
        SelectCommand="SELECT TOP 2 Title, Author, DateUpdated, List_FKID FROM List_Popular">
    </asp:SqlDataSource>
            </div>
            <div style="height: 303px; width: 424px; position:relative; top: -234px; left: 486px;" 
                class = "latestDisc4">
                <asp:ListView ID="ListView2" runat="server" 
                    DataSourceID="SqlDataSource2"><AlternatingItemTemplate><span 
                            style="background-color: #FFFFFF;color: #284775;"><br />
                            <asp:HyperLink ID = "HyperLink1" NavigateUrl='<%# Eval("Q_FKID", "ViewQuestionDetails.aspx?ID={0}") %>'  runat="server" >
 <asp:Label ID="QuestionLabel" runat="server" Text='<%# Eval("Question") %>' />
 </asp:HyperLink><br />
DateUpdated: <asp:Label ID="DateUpdatedLabel" runat="server" Text='<%# Eval("DateUpdated") %>' /><br />
Author: <asp:Label ID="AuthorLabel" runat="server" Text='<%# Eval("Author") %>' /><br />
<br /></span></AlternatingItemTemplate><EditItemTemplate><span style="background-color: #999999;">Q_FKID: <asp:TextBox 
                            ID="Q_FKIDTextBox" runat="server" Text='<%# Bind("Q_FKID") %>' /><br />
Question: <asp:TextBox ID="QuestionTextBox" runat="server" Text='<%# Bind("Question") %>' /><br />
DateUpdated: <asp:TextBox ID="DateUpdatedTextBox" runat="server" Text='<%# Bind("DateUpdated") %>' /><br />
Author: <asp:TextBox ID="AuthorTextBox" runat="server" Text='<%# Bind("Author") %>' /><br />
<asp:Button 
                            ID="UpdateButton" runat="server" CommandName="Update" Text="Update" /><asp:Button 
                            ID="CancelButton" runat="server" CommandName="Cancel" Text="Cancel" /><br /><br /></span></EditItemTemplate><EmptyDataTemplate><span>No data was returned.</span></EmptyDataTemplate><InsertItemTemplate><span 
                        style="">Q_FKID: <asp:TextBox ID="Q_FKIDTextBox" runat="server" 
                        Text='<%# Bind("Q_FKID") %>' /><br />Question: <asp:TextBox 
                        ID="QuestionTextBox" runat="server" Text='<%# Bind("Question") %>' /><br />DateUpdated: <asp:TextBox 
                        ID="DateUpdatedTextBox" runat="server" Text='<%# Bind("DateUpdated") %>' /><br />Author: <asp:TextBox 
                        ID="AuthorTextBox" runat="server" Text='<%# Bind("Author") %>' /><br /><asp:Button 
                        ID="InsertButton" runat="server" CommandName="Insert" Text="Insert" /><asp:Button 
                        ID="CancelButton" runat="server" CommandName="Cancel" Text="Clear" /><br /><br /></span></InsertItemTemplate><ItemTemplate><span 
                            style="background-color: #E0FFFF;color: #333333;"><br />
<asp:HyperLink ID = "HyperLink1" NavigateUrl='<%# Eval("Q_FKID", "ViewQuestionDetails.aspx?ID={0}") %>'  runat="server" >
<asp:Label ID="QuestionLabel" runat="server" Text='<%# Eval("Question") %>' />
</asp:HyperLink><br />
DateUpdated: <asp:Label ID="DateUpdatedLabel" runat="server" Text='<%# Eval("DateUpdated") %>' /><br />
Author: <asp:Label ID="AuthorLabel" runat="server" Text='<%# Eval("Author") %>' /><br />
<br /></span></ItemTemplate><LayoutTemplate><div ID="itemPlaceholderContainer" runat="server" 
                            style="font-family: Verdana, Arial, Helvetica, sans-serif;"><span runat="server" id="itemPlaceholder" /></div><div 
                            style="text-align: center;background-color: #5D7B9D;font-family: Verdana, Arial, Helvetica, sans-serif;color: #FFFFFF;"></div></LayoutTemplate><SelectedItemTemplate><span 
                            style="background-color: #E2DED6;font-weight: bold;color: #333333;">Q_FKID: <asp:Label 
                            ID="Q_FKIDLabel" runat="server" Text='<%# Eval("Q_FKID") %>' /><br />
Question: <asp:Label ID="QuestionLabel" runat="server" Text='<%# Eval("Question") %>' /><br />
DateUpdated: <asp:Label ID="DateUpdatedLabel" runat="server" Text='<%# Eval("DateUpdated") %>' /><br />
Author: <asp:Label ID="AuthorLabel" runat="server" Text='<%# Eval("Author") %>' /><br />
<br /></span></SelectedItemTemplate></asp:ListView>
                <asp:SqlDataSource ID="SqlDataSource2" 
                    runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionStringList %>" 
                    ProviderName="<%$ ConnectionStrings:ConnectionStringList.ProviderName %>" 
                    SelectCommand="SELECT TOP 2 Q_FKID, Question, DateUpdated, Author FROM Question_Popular"></asp:SqlDataSource></div>
</asp:Content>
